<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.js"></script>
	</head>
	<body>
		<div id="root">
			<div>
				<h1>数组</h1>
				<li v-for = "(h,index) in person.hobby">
					{{h}}
				</li>
			</div>
			</br>
			<div>
				<h1>对象</h1>
				<li v-for = "(h,index) of person.hobby2">
					{{h}}
				</li>
			</div>
		</div>
		
		<script type="text/javascript">
			const vm = new Vue({
				el: "#root",
				data: {
					person: {
						name: 'zhangsan',
						hobby: ['抽烟','喝酒','烫头'],
						hobby2: {
							h1: '抽烟',
							h2: '喝酒',
							h3: '烫头'
						}
					}
				}
			})
		</script>
	</body>
</html>